  /**
   * Generate time : 2016-12-23 15:37:03
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zm.cg.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.util.DateUtils;
import java.math.BigDecimal;
import java.util.Date;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * ZMCGPowerStationRecord 
 * table comment : 电厂电量（计量单位都为万度） 
 */
public class ZMCGPowerStationRecord extends DaoEPBase {

	private String fdKeyId = " ";		
	private String fdStationname = " ";		/* 电厂名称*/
	private Long fdYear = new Long(0);	/* 年份*/
	private Long fdMonth = new Long(0);	/* 月份*/
	private Date fdVirtualdate;	/* 调度日期*/
	private BigDecimal fdGeneratcapacity = new BigDecimal("0");		/* 发电量*/
	private BigDecimal fdNetcapacity = new BigDecimal("0");		/* 上网电量*/
	private BigDecimal fdMonthsum = new BigDecimal("0");		/* 发电月累计*/
	private BigDecimal fdYearsum = new BigDecimal("0");		/* 发电年累计*/
	private BigDecimal fdNetmonthsum = new BigDecimal("0");		/* 上网电月累计*/
	private BigDecimal fdNetyearsum = new BigDecimal("0");		/* 上网电年累计*/
	private String fdCreatorId = " ";		
	private String fdCreator = " ";		/* 录入人*/
	private BigDecimal fdCoalstock = new BigDecimal("0");		/* 电厂煤库存*/
	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	eiColumn = new EiColumn("fdKeyId");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStationname");
	eiColumn.setFieldLength(50);	
	eiColumn.setDescName("电厂名称");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdYear");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(38);
	eiColumn.setDescName("年份");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdMonth");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(38);
	eiColumn.setDescName("月份");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdVirtualdate");
	eiColumn.setDescName("调度日期");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdGeneratcapacity");
	eiColumn.setType("N");
	eiColumn.setScaleLength(4);
	eiColumn.setFieldLength(15);
	eiColumn.setDescName("发电量");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdNetcapacity");
	eiColumn.setType("N");
	eiColumn.setScaleLength(4);
	eiColumn.setFieldLength(15);
	eiColumn.setDescName("上网电量");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdMonthsum");
	eiColumn.setType("N");
	eiColumn.setScaleLength(4);
	eiColumn.setFieldLength(15);
	eiColumn.setDescName("发电月累计");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdYearsum");
	eiColumn.setType("N");
	eiColumn.setScaleLength(4);
	eiColumn.setFieldLength(15);
	eiColumn.setDescName("发电年累计");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdNetmonthsum");
	eiColumn.setType("N");
	eiColumn.setScaleLength(4);
	eiColumn.setFieldLength(15);
	eiColumn.setDescName("上网电月累计");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdNetyearsum");
	eiColumn.setType("N");
	eiColumn.setScaleLength(4);
	eiColumn.setFieldLength(15);
	eiColumn.setDescName("上网电年累计");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdCreatorId");
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdCreator");
	eiColumn.setFieldLength(30);	
	eiColumn.setDescName("录入人");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdCoalstock");
	eiColumn.setType("N");
	eiColumn.setScaleLength(4);
	eiColumn.setFieldLength(15);
	eiColumn.setDescName("电厂煤库存");
	eiMetadata.addMeta(eiColumn);
	}
	/**
	 * the constructor
	 */
	public ZMCGPowerStationRecord() {
		initMetaData();
	}
	
	/**
	 * get the fdKeyId 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}
	
	/**
	 * set the fdKeyId 
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}
	/**
	 * get the fdStationname - 电厂名称
	 * @return the fdStationname
	 */
	public String getFdStationname() {
		return this.fdStationname;
	}
	
	/**
	 * set the fdStationname - 电厂名称
	 */
	public void setFdStationname(String fdStationname) {
		this.fdStationname = fdStationname;
	}
	/**
	 * get the fdYear - 年份
	 * @return the fdYear
	 */
	public Long getFdYear() {
		return this.fdYear;
	}
	
	/**
	 * set the fdYear - 年份
	 */
	public void setFdYear(Long fdYear) {
		this.fdYear = fdYear;
	}
	/**
	 * get the fdMonth - 月份
	 * @return the fdMonth
	 */
	public Long getFdMonth() {
		return this.fdMonth;
	}
	
	/**
	 * set the fdMonth - 月份
	 */
	public void setFdMonth(Long fdMonth) {
		this.fdMonth = fdMonth;
	}
	/**
	 * get the fdVirtualdate - 调度日期
	 * @return the fdVirtualdate
	 */
	public Date getFdVirtualdate() {
		return this.fdVirtualdate;
	}
	
	/**
	 * set the fdVirtualdate - 调度日期
	 */
	public void setFdVirtualdate(Date fdVirtualdate) {
		this.fdVirtualdate = fdVirtualdate;
	}
	/**
	 * get the fdGeneratcapacity - 发电量
	 * @return the fdGeneratcapacity
	 */
	public BigDecimal getFdGeneratcapacity() {
		return this.fdGeneratcapacity;
	}
	
	/**
	 * set the fdGeneratcapacity - 发电量
	 */
	public void setFdGeneratcapacity(BigDecimal fdGeneratcapacity) {
		this.fdGeneratcapacity = fdGeneratcapacity;
	}
	/**
	 * get the fdNetcapacity - 上网电量
	 * @return the fdNetcapacity
	 */
	public BigDecimal getFdNetcapacity() {
		return this.fdNetcapacity;
	}
	
	/**
	 * set the fdNetcapacity - 上网电量
	 */
	public void setFdNetcapacity(BigDecimal fdNetcapacity) {
		this.fdNetcapacity = fdNetcapacity;
	}
	/**
	 * get the fdMonthsum - 发电月累计
	 * @return the fdMonthsum
	 */
	public BigDecimal getFdMonthsum() {
		return this.fdMonthsum;
	}
	
	/**
	 * set the fdMonthsum - 发电月累计
	 */
	public void setFdMonthsum(BigDecimal fdMonthsum) {
		this.fdMonthsum = fdMonthsum;
	}
	/**
	 * get the fdYearsum - 发电年累计
	 * @return the fdYearsum
	 */
	public BigDecimal getFdYearsum() {
		return this.fdYearsum;
	}
	
	/**
	 * set the fdYearsum - 发电年累计
	 */
	public void setFdYearsum(BigDecimal fdYearsum) {
		this.fdYearsum = fdYearsum;
	}
	/**
	 * get the fdNetmonthsum - 上网电月累计
	 * @return the fdNetmonthsum
	 */
	public BigDecimal getFdNetmonthsum() {
		return this.fdNetmonthsum;
	}
	
	/**
	 * set the fdNetmonthsum - 上网电月累计
	 */
	public void setFdNetmonthsum(BigDecimal fdNetmonthsum) {
		this.fdNetmonthsum = fdNetmonthsum;
	}
	/**
	 * get the fdNetyearsum - 上网电年累计
	 * @return the fdNetyearsum
	 */
	public BigDecimal getFdNetyearsum() {
		return this.fdNetyearsum;
	}
	
	/**
	 * set the fdNetyearsum - 上网电年累计
	 */
	public void setFdNetyearsum(BigDecimal fdNetyearsum) {
		this.fdNetyearsum = fdNetyearsum;
	}
	/**
	 * get the fdCreatorId 
	 * @return the fdCreatorId
	 */
	public String getFdCreatorId() {
		return this.fdCreatorId;
	}
	
	/**
	 * set the fdCreatorId 
	 */
	public void setFdCreatorId(String fdCreatorId) {
		this.fdCreatorId = fdCreatorId;
	}
	/**
	 * get the fdCreator - 录入人
	 * @return the fdCreator
	 */
	public String getFdCreator() {
		return this.fdCreator;
	}
	
	/**
	 * set the fdCreator - 录入人
	 */
	public void setFdCreator(String fdCreator) {
		this.fdCreator = fdCreator;
	}
	
	/**
	 * get the fdCoalstock - 电厂煤库存
	 * @return the fdCoalstock
	 */
	public BigDecimal getFdCoalstock() {
		return this.fdCoalstock;
	}
	
	/**
	 * set the fdCoalstock - 电厂煤库存
	 */
	public void setFdCoalstock(BigDecimal fdCoalstock) {
		this.fdCoalstock = fdCoalstock;
	}
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdStationname(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStationname")), fdStationname));
		setFdYear(NumberUtils.toLong(StringUtils.toString(map.get("fdYear")), fdYear));
		setFdMonth(NumberUtils.toLong(StringUtils.toString(map.get("fdMonth")), fdMonth));
		setFdVirtualdate(DateUtils.toDate(StringUtils.toString(map.get("fdVirtualdate"))));
		setFdGeneratcapacity(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdGeneratcapacity")), fdGeneratcapacity));
		setFdNetcapacity(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdNetcapacity")), fdNetcapacity));
		setFdMonthsum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdMonthsum")), fdMonthsum));
		setFdYearsum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdYearsum")), fdYearsum));
		setFdNetmonthsum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdNetmonthsum")), fdNetmonthsum));
		setFdNetyearsum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdNetyearsum")), fdNetyearsum));
		setFdCreatorId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCreatorId")), fdCreatorId));
		setFdCreator(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCreator")), fdCreator));
		setFdCoalstock(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdCoalstock")), fdCoalstock));
	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("fdKeyId",StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));	
			map.put("fdStationname",StringUtils.toString(fdStationname, eiMetadata.getMeta("fdStationname")));	
			map.put("fdYear",StringUtils.toString(fdYear, eiMetadata.getMeta("fdYear")));	
			map.put("fdMonth",StringUtils.toString(fdMonth, eiMetadata.getMeta("fdMonth")));	
			map.put("fdVirtualdate",StringUtils.toString(fdVirtualdate, eiMetadata.getMeta("fdVirtualdate")));	
			map.put("fdGeneratcapacity",StringUtils.toString(fdGeneratcapacity, eiMetadata.getMeta("fdGeneratcapacity")));	
			map.put("fdNetcapacity",StringUtils.toString(fdNetcapacity, eiMetadata.getMeta("fdNetcapacity")));	
			map.put("fdMonthsum",StringUtils.toString(fdMonthsum, eiMetadata.getMeta("fdMonthsum")));	
			map.put("fdYearsum",StringUtils.toString(fdYearsum, eiMetadata.getMeta("fdYearsum")));	
			map.put("fdNetmonthsum",StringUtils.toString(fdNetmonthsum, eiMetadata.getMeta("fdNetmonthsum")));	
			map.put("fdNetyearsum",StringUtils.toString(fdNetyearsum, eiMetadata.getMeta("fdNetyearsum")));	
			map.put("fdCreatorId",StringUtils.toString(fdCreatorId, eiMetadata.getMeta("fdCreatorId")));	
			map.put("fdCreator",StringUtils.toString(fdCreator, eiMetadata.getMeta("fdCreator")));	
			map.put("fdCoalstock",StringUtils.toString(fdCoalstock, eiMetadata.getMeta("fdCoalstock")));
			
		return map;
	
	}
}